<!--
 * @Description:
 * @Version: 2.0
 * @Autor: kafei
 * @Date: 2021-11-22 11:41:43
 * @LastEditors: kafei
 * @LastEditTime: 2021-12-20 14:27:54
-->
<template>
  <div class="systemUser z-w-100 flex">
    <leftTree @treeClick="treeClick" />
    <rightContent
      ref="rightContent"
      @refresh="refreshFun"
    />
  </div>
</template>

<script>
import leftTree from './component/leftTree/index.vue'
import rightContent from './component/rightContent/index.vue'
export default {
  name: 'SystemUser',
  components: {
    leftTree,
    rightContent
  },
  data () {
    return {
      node: {},
      treeNode: {}
    }
  },
  created () {},
  methods: {
    refreshFun () {
      this.treeClick({ data: this.node, node: this.treeNode })
    },
    async treeClick ({ data, node }) {
      this.node = data
      this.treeNode = node
      console.log(node, 'nodeaaaaaaaa')
      this.$nextTick(() => {
        if (Object.keys(data).length > 0) {
          this.$refs.rightContent.setListTable({
            depId: data.depId,
            page: 1,
            size: 10
          })
        }
      })
    }
  }
}
</script>

<style></style>
